﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpWeb
{
    /// <summary>
    /// fieldset 元素可将表单内的相关元素分组。 
    /// </summary>
    public class FieldsetTag : AbstractContainerTagComponent
    {
        public FieldsetTag()
        {
            _legend = new ContainerTagComponent();
            this.Children.Add(_legend);
        }
        private readonly ContainerTagComponent _legend;

        public ContainerTagComponent legend
        {
            get { return _legend; }
        }

        /// <summary>
        /// 将legend元素的现有内容清空并插入以此值为内容的StringTag
        /// </summary>
        public string Title
        {
            set
            {
                legend.Children.Clear();
                legend.Children.Add(new StringTag(value));
            }
        }


    }
}
